package com.eboss2.sbs.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.eboss2.sbs.R;
import com.eboss2.sbs.activity.base.BaseActivity;
import com.eboss2.sbs.config.Config;
import com.eboss2.sbs.http.API;
import com.eboss2.sbs.http.HttpCallback;
import com.eboss2.sbs.http.HttpUtil;
import com.eboss2.sbs.model.ExmineManageInfo;
import com.eboss2.sbs.model.WalletAccountInfo;
import com.eboss2.sbs.myapplication.MyApplication;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.loopj.android.http.RequestParams;
import com.mytools.tool.activityManager.MyActivityManager;
import com.tool.utils.utils.SPUtils;
import com.tool.utils.utils.StringUtils;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MyExmineDetailActivity extends BaseActivity implements View.OnClickListener {


    @BindView(R.id.tv_exmine_status)
    TextView tvExmineStatus;
    @BindView(R.id.tv_exmine_record)
    TextView tvExmineRecord;
    @BindView(R.id.tv_goods_from)
    TextView tvGoodsFrom;
    @BindView(R.id.tv_commit_time)
    TextView tvCommitTime;
    @BindView(R.id.tv_ok)
    TextView tvOk;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mContext = this;
        setContentView(R.layout.activity_exmine_detail);
        ButterKnife.bind(this);
        MyActivityManager.getInstance().addActivity(this);
        initView();
        getdata();
    }

    private void initData() {
        SPUtils.clear(Config.GG_FILE_NAME, mContext);
    }

    private void initView() {
        showView(R.id.titleback_btn_back, true);
        setTvText(R.id.tv_title, "审核详情");
        findViewById(R.id.titleback_btn_back).setOnClickListener(this);


    }


    private void getdata() {

        String url = Config.SBS_CHECK_GOODS_DETAIL;
        RequestParams params = new RequestParams();
        params.put("goodid", "1");
        showProgress("加载中...");

        HttpUtil.get(url, params, new HttpUtil.RequestListener() {

            @Override
            public void success(String response) {
                disShowProgress();
                try {

                    JSONObject result = new JSONObject(response);
                    if (!result.optBoolean("status")) {
                        showErrorMsg(result.getString("message"));
                        return;
                    }
                    JSONObject obj = result.getJSONObject("data");




                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }

            @Override
            public void failed(Throwable error) {
                showE404();
                disShowProgress();
            }
        });
    }

    @Override
    protected void onResume() {
        super.onResume();

    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.titleback_btn_back:
                finish();
                break;
            case R.id.tv_ok:
                Intent intent = new Intent();
                intent.setClass(mContext, ActivityProductDetails.class);
//		intent.putExtra("id", datas.get(position).getId());
                startActivity(intent);
                break;

            default:
                break;
        }
    }


    @OnClick(R.id.tv_ok)
    public void onViewClicked() {
    }
}
